<?php
if(isset($mess_succ) && $mess_succ!="") {
    echo "<div class='mess_succ'>";
    echo    "<ul>";
    echo        "<li>$mess_succ</li>";
    echo    "</ul>";
    echo "</div>";
}
?>
<div style="margin-top: 10px; padding: 10px; width: 100px; text-align: center;" class="button"><a style="display: block;" href="<?php echo base_url(); ?>admin_combo/module/search">Tìm kiếm</a></div>
<div align="center">
    <div id="recorddata">
        <table>
            <tr>
                <td class="title">Stt</td>
                <td class="title">Tên</td>
                <td class="title">Ghi Chú</td>
                <td class="title">Vị Trí</td>
                <td class="title">Link</td>
                <td class="title">Edit</td>
                <td class="title">Del</td>
            </tr>
            <?php
                if($info != "empty") {
                    $stt=0;
                    foreach($info as $item) {
                        $stt++;
                        echo "<tr>";
                        echo    "<td>$stt</td>";
                        echo    "<td>$item[module_name]</td>";
                        echo    "<td>$item[module_note]</td>";
                        echo    "<td>$item[module_order]</td>";
                        echo    "<td>$item[module_link]</td>";
                        echo    "<td class='action edit'><a href='".base_url()."admin_combo/module/edit/$item[module_id]' id='edit_$item[module_id]'><strong>Edit</strong></a></td>";
                        echo    "<td class='action del'><a href='".base_url()."admin_combo/module/del/$item[module_id]' id='del_$item[module_id]' 
                                    onclick='return confirm_delete(\"Bạn có chắc chắn muốn xóa?\");'><strong>Del</strong></a></td>";
                        echo "</tr>";
                    }
                }else
                    echo "<tr><td colspan='9'><font style='color: #99CC00; font-weight: bold;'>$info</font></td></tr>"
            ?>
        </table>
    </div>
<?php
    echo $this->pagination->create_links();
?>
<table width="100%">
    <tr>
        <td class="title">
            <a href="javascript:void(0,0);" class="add">Thêm module</a>
        </td>
    </tr>
</table>
</div>
<div id="formerror"></div>
<!-- Add Form -->
<div id="formaction_module">
    <div class="formPanel02">
        <fieldset>
            <legend>Thêm module</legend>
            <form id="input_form_module" method="post">
                <table id="tbfrmaction">
                    <tr>
                        <td>Tên</td>
                        <td>
                            <input type="text" id="txtName" name="txtName" size="30" class="required" />
                        </td>
                        <td>Ghi Chú</td>
                        <td>
                            <textarea id="txtNote" name="txtNote" cols="30" rows="4"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td>Vị Trí</td>
                        <td>
                            <input type="text" id="txtOrder" name="txtOrder" size="10" class="required digits" />
                        </td>
                        <td>Link</td>
                        <td>
                            <input type="text" id="txtLink" name="txtLink" size="30" class="required" />
                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td><input type="submit" id="btnSubmit_module" class="button" name="ok" value="Đăng ký" /></td>
                    </tr>
                </table>
            </form>
        </fieldset>
    </div>
</div>
<div id="dialog" title="Warning"></div>

